package collection;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Test03_Map {

	public static void main(String[] args) {
		Map<Integer, String> map = new HashMap<Integer, String>();

		map.put(1, "김김김");
		map.put(2, "나나나");
		map.put(3, "다다다");
		map.put(4, "라라라");

		map.put(4, "마마마");
		String value = map.get(4);
		map.remove(4);
		// System.out.println(map.get(4));

		Set<Integer> st = map.keySet();
		Iterator<Integer> it = st.iterator();
		while (it.hasNext()) {
			Integer key = it.next();
			String val = map.get(key);
			System.out.println(val);// /

		}
	}

}
